# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-crypt-dsa
_pkgname=Crypt-DSA
pkgver=1.17
pkgrel=17
pkgdesc='DSA Signatures and Key Generation.'
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl' 'perl-data-buffer>=0.01' 'perl-digest-sha1'
         'perl-file-which>=0.05')
makedepends=('perl-module-install')
url='http://search.cpan.org/dist/Crypt-DSA'
source=("http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/$_pkgname-$pkgver.tar.gz")
sha512sums=('2eac27cb08439a6d5cfdf1ee5f38412bc1dddb53c1865e5adc4f8c758ba1d221e5d30608bd12178beb15aed28940fa5db547520d57d8714919e20f0588fb1bfc')
_distdir="$_pkgname-$pkgver"

build() {
  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB=""                 \
      PERL_AUTOINSTALL=--skipdeps                            \
      PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'"     \
      PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
      MODULEBUILDRC=/dev/null

    cd $_distdir

    /usr/bin/perl Makefile.PL

    make
  )
}

package() {
  cd $_distdir

  make install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

